// keys() 键名遍历
for (let index of['a', 'b'].keys()) {
    console.log(index);
}

// values() 谷歌浏览器测试 没有 values()方法
// for (let elem of['a', 'b'].values()) {
//     console.log(elem);
// }

// entries() 键值对的遍历
for (let [index, elems] of['a', 'b'].entries()) {
    console.log(index, elems);
}
// 0 "a"
// 1 "b"

let letter = ['a', 'b', 'c'];
let entries = letter.entries();
console.log(entries.next().value); // [0, 'a']
console.log(entries.next().value); // [1, 'b']
console.log(entries.next().value); // [2, 'c']
